One of the major advantages of a diffraction based biosensor that is used in a reflective mode is that it can be used with non-transparent and/or absorbing samples. A diffraction based biosensor represents a phase diffraction grating that typically has a relatively low diffractive efficiency in reflection for low angles of incidence. The diffractive efficiency improves significantly at the angle of incidence that is close to the angle of total internal reflection. Utilization of these angles represents a technical difficulty that can be overcame by the use of the light deflection element such as a prism, (see M. C. Goh, Method and apparatus for assay based on light diffraction, US 2011/0111487) or a diffraction grating.